import Login from './views/Login.vue'
import NotFound from './views/404.vue'
import Home from './views/Home.vue'
import CertifiedReferee from './views/nav1/CertifiedReferee.vue'
import RefereeDetail from './views/nav1/RefereeDetail.vue'
import Examine from './views/nav1/Examine.vue'
import AddRe from './views/nav1/AddRe.vue'
import AddForm from './views/nav1/AddForm.vue'
import CreateEvents from './views/nav2/CreateEvents.vue'
import EditMatch from './views/nav2/editMatch.vue'
import EditEvents from './views/nav2/EditEvents.vue'
import Page4 from './views/nav2/Page4.vue'
import EventManagement from './views/nav2/EventManagement.vue'  // 所有赛事列表
import MyEventManagement from './views/nav2/MyEventManagement.vue'  // 我管理的赛事列表
import ApplyEvent from './views/nav2/ApplyEvent.vue'   //  我报名的赛事列表
import InviteEvent from './views/nav2/InviteEvent.vue'   //  邀请我的赛事列表
import Page6 from './views/nav3/Page6.vue'
import RePosition from './views/nav3/RePosition.vue'
import GameLevel from './views/nav3/GameLevel.vue'
import ReLevel from './views/nav3/ReLevel.vue'
import ReOrgList from './views/nav3/ReOrgList.vue'
import echarts from './views/charts/echarts.vue'
import EventDetail from './views/nav2/EventDetail.vue'
import InviteEventDetail from './views/nav2/InviteEventDetail.vue'
let routes = [
    {
        path: '/login',
        component: Login,
        name: '',
        hidden: true
    },
    {
        path: '/logout',
        component: Login,
        name: 'logout',
        hidden: true
    },
    {
        path: '/404',
        component: NotFound,
        name: '',
        hidden: true
    },
    //{ path: '/main', component: Main },
    {
        path: '/',
        component: Home,
        name: '赛事管理',
        iconCls: 'fa fa-trophy fa-fw',
        children: [
            // { path: '/page4', component: Page4, name: '赛事业务流' },
            { 
                path: '/eventManagement', 
                component: EventManagement, 
                name: '全部赛事',
                meta:{
                    requireAuth: true
                }, 
            },
            { 
                path: '/applyEvent', 
                component: ApplyEvent, 
                name: '我报名的赛事',
                meta:{
                    requireAuth: true
                }
            },
            { 
                path: '/inviteEvent', 
                component: InviteEvent, 
                name: '邀请我的赛事',
                meta:{
                    requireAuth: true
                }
            },
            { 
                path: '/myeventManagement', 
                component: MyEventManagement, 
                name: '我管理的赛事',
                meta:{
                    requireAuth: true
                }
            },
            { 
                path: '/eventdetail', 
                component: EventDetail, 
                name: '赛事详情',
                meta:{
                    requireAuth: true
                },
                hidden: true
            },
            { 
                path: '/invitedetail', 
                component: InviteEventDetail, 
                name: '赛事详情',
                meta:{
                    requireAuth: true
                },
                hidden: true
            },
            { 
                path: '/editEvents', 
                component: EditEvents, 
                name: '编辑赛事',
                meta:{
                    requireAuth: true
                },
                hidden: true
            },
            { 
                path: '/editMatch', 
                component: EditMatch, 
                name: '查看赛事',
                meta:{
                    requireAuth: true
                },
                hidden: true
            }
        ]
    },
    {
        path: '/',
        component: Home,
        name: '裁判员',
        redirect: '/certifiedReferee',
        iconCls: 'fa fa-users fa-fw',//图标样式class
        children: [
            { 
                path: '/certifiedReferee', 
                component: CertifiedReferee, 
                name: '裁判员列表', 
                meta:{
                    requireAuth: true
                } 
            },
            { 
                path: '/refereedetail', 
                component: RefereeDetail, 
                name: '裁判员详情',
                meta:{
                    requireAuth: true
                },
                hidden: true 
            }
        ]
    },
    {
        path: '/',
        component: Home,
        name: '个人中心',
        iconCls: 'fa fa-id-card-o fa-fw',
        children: [
            { 
                path: '/page4', 
                component: Page4, 
                name: '资料管理',
                meta:{
                    requireAuth: true
                }
             }
            // { path: '/page5', component: Page5, name: '页面5' }
        ]
    },
    {
        path: '*',
        hidden: true,
        redirect: { path: '/404' }
    }
];

export default routes;